package com.ssyc.gsk_teacher.adapter;


import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ssyc.common.glide.ImageUtil;
import com.ssyc.gsk_teacher.R;

import java.util.List;

/**
 * 公告详情展示图片里列表
 * Created by Administrator on 2018/6/25 0025.
 */

public class ShowImgRvAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
    private Context context;
    private List<String> urls;

    public ShowImgRvAdapter(Context context, int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
        this.context = context;
        this.urls = data;
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        //图片
        ImageView iv = helper.getView(R.id.iv);
        ImageUtil.displayImage(context, iv, item, R.drawable.defaultimage);
    }
}
